import request from '@/utils/request'

export function fetchDataGovernanceTaskList(data) {
  return request({
    url: '/system/datagovernance/DataGovernanceTask/list',
    method: 'post',
    data
  })
}

export function getDataGovernanceTask(id) {
  return request({
    url: '/system/datagovernance/DataGovernanceTask/detail/' + id,
    method: 'get'
  })
}

export function createDataGovernanceTask(data) {
  return request({
    url: '/system/datagovernance/DataGovernanceTask/add',
    method: 'post',
    data
  })
}

export function updateDataGovernanceTask(data) {
  return request({
    url: '/system/datagovernance/DataGovernanceTask/update',
    method: 'post',
    data
  })
}

export function deleteDataGovernanceTask(ids) {
  return request({
    url: '/system/datagovernance/DataGovernanceTask/delete',
    method: 'post',
    data: { ids }
  })
}
//执行一次
export function startOne(data) {
  return request({
    url: '/system/datagovernance/DataGovernanceTask/runAJobNow' ,
    method: 'post',
    data
  })
}
//开始停止
export function changeJobStatus(data) {
  return request({
    url: '/system/datagovernance/DataGovernanceTask/changeJobStatus' ,
    method: 'post',
    data
  })
}
export function getmetadataJob(id) {
  return request({
    url: '/system/datagovernance/DataGovernanceTask/detail/' + id,
    method: 'get'
  })
}

